function ajaxText(url)
{
	var request=false;
	if(window.XMLHttpRequest)
	{
	request=new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
	request=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	if(url.indexOf("?")!=-1){url=url+"&"+Math.random();}
	else {url=url+"?"+Math.random();}
	request.open('GET', url, false);
	request.send(null);
	return request.responseText;
}
function ajaxXml(url)
{
	var request=false;
	if(window.XMLHttpRequest)
	{
	request=new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
	request=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	if(url.indexOf("?")!=-1){url=url+"&"+Math.random();}
	else {url=url+"?"+Math.random();}
	request.open('GET', url, false);
	request.send(null);
	return request.responseXML;
}
function ajaxAlert(url)
{
	alert(ajaxText(url));
}
function ajaxEcho(url,divid)
{
	eval(divid).innerHTML=ajaxText(url);
}
function ajaxEchoHidden(url,divid)
{
	var obj=eval(divid);
	if(obj.innerHTML!="")
	{
		obj.innerHTML="";
	}
	else
	{
		ajaxEcho(url,divid);
	}
}

function ajaxGetBack(url,request,callback)
{
	if(window.XMLHttpRequest)
	{
	request=new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
	request=new ActiveXObject("Microsoft.XMLHTTP");
	}
	request.onreadystatechange=callback;
	request.open('GET', url,false);
	request.send(null);
}
function ajaxPostBack(url,data,request,callback)
{
	if(window.XMLHttpRequest)
	{
	request=new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
	request=new ActiveXObject("Microsoft.XMLHTTP");
	}
	request.onreadystatechange=callback;
	request.open('POST', url, false);
	request.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=GB2312");
	request.send(data);
}
function ajaxPost(url,data,async)
{	
    var request=false;
	if(window.XMLHttpRequest)
	{
	request=new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
	request=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	request.open('POST', url, async);
	request.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=GB2312");
	request.send(data);
	if(!async)return request.responseText;

}
function ajax(divid,text){
	eval(divid).innerHTML=text;
}
